package com.langfeiyes.pattern.observer.demo;

//具体观察者(订阅者)
public class ConcreteObserver implements Observer{
    @Override
    public void update(Subject subject) {
        System.out.println("观察到目标对象(被观察者：subject)的状态变化了....");

        ConcreteSubject sb = (ConcreteSubject) subject;
        System.out.println("最新状态为：" + sb.getState());

    }
}
